const a = function (
  { row: { dname, debtGuid } },
  _,
  { h, dc: { open, http, store }, dayjs }
) {
  return h(
    "a",
    {
      href: "#",
      onClick: async (event) => {
        event.target.style.color = "red";
        const year = dayjs(store.get("user", "date")).format("YYYY");
        const subs = { eGridZwjjBack: 4, eGridZwjjRate: 5 };
        const eFormZwjjBase = await http.form({
          url: "/zw/czDebt/findDebtByGuid",
          data: { GUID: debtGuid, YEAR: year },
        });
        const { items: eGridZwjjInfo } = await http.form({
          url: "/zw/czDebt/listDebtSub",
          data: { DEBTGUID: debtGuid, YEAR: year, CTYPE: 3 },
        });
        const transfer = {
          GUID: debtGuid,
          isReadonly: true,
          eFormZwjjBase,
          eGridZwjjInfo,
          activeKey: "pZwjjInfo",
        };
        const getSubUrl = "/zw/czDebt/listDebtSub";
        const getSubArg = { DEBTGUID: debtGuid, YEAR: year };
        for (const key of Object.keys(subs)) {
          const { items } = await http.form({
            url: getSubUrl,
            data: { ...getSubArg, CTYPE: subs[key] },
          });
          transfer[key] = items;
        }
        const layout = { id: "pZwjjM" };
        const modal = {
          width: "75vw",
          minHeight: document.body.clientHeight * 0.75,
          defaultFullscreen: false,
          destroyOnClose: true,
          centered: true,
          open: true,
          showOkBtn: false,
          showCancelBtn: false,
        };
        const slots = {
          title: () => [
            "债务详情（",
            h("span", { style: "color: red" }, "单位：万元"),
            "）",
          ],
        };
        const inner = {};
        open({ inner, layout, modal, slots, transfer });
        return false;
      },
    },
    dname
  );
};
